import numpy as np
import time


x = np.linspace(1,11,100)
t = np.linspace(1,11,100)
fx = x/x
f1=[]
T1 = time.time()
for i in x:
    f1.append(np.trapezoid(t,fx*np.exp(i-t)))
T2 =time.time()
print('程序运行时间:%s毫秒' % ((T2 - T1)*1000))
f1 = np.array(f1)

T1 = time.time()
f2 = np.exp(x)*np.trapezoid(t,fx*np.exp(-t))
T2 =time.time()
print('程序运行时间:%s毫秒' % ((T2 - T1)*1000))

test = f1-f2